<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends MY_Controller {

	public function index()
	{
//        $this->load->library('taobao');
//
//        $this->taobao->appkey = '21215945';
//        $this->taobao->secretKey = '8db40d42653c2f644c50eb172294eef1';
//
//        $this->taobao->appkey = '1021215945';
//        $this->taobao->secretKey = 'sandbox2653c2f644c50eb172294eef1'; //沙箱key
//
//        $this->taobao->format = 'json';
//        $this->taobao->gatewayUrl = 'http://gw.api.tbsandbox.com/router/rest';
//
//        $params = array();
//        $params['fields'] = 'tid,oid,role,nick,result,created,rated_nick,item_title,item_price,content,reply,num_iid';
//        $params['rate_type'] = 'get';
//        $params['role'] = 'buyer';
//
//        $SessionKey = '';
//
//        $resp = $this->taobao->execute('taobao.traderates.get', $params, $SessionKey);
//
//        var_dump($resp);

		$this->load->model('Comments');
		$month_data_good=$this->Comments->get_month_data('good');
		$month_data_bad=$this->Comments->get_month_data('bad');
		$month_data_neutral=$this->Comments->get_month_data('neutral');	
		$result=array(
		    'month_data_good' => $month_data_good,
			'month_data_bad' => $month_data_bad,
			'month_data_neutral' => $month_data_neutral,
		);
		$this->display('welcome_message',$result);



	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */